#include <iostream>
using namespace std;
void matrix(int n,int a[100][100]){
	int v=0;
	for (int j=0;j<n;j++){
		
		for (int i=j;i<=n-1;i++){
			v++;
			a[i][j]=v;
			a[j][i]=a[i][j];
		}
		
	}
	for (int c=0;c<n;c++){
		for (int d=0;d<n;d++){
			cout<<a[c][d]<<"   ";
			
		}
		cout<<"\n";
	}
	
}



int main (void){
	int a[100][100];
	int n=4;
	matrix(4,a);
	return 0;
}
